/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Master;

import MessageHandler.IMessageHandler;
import MessageHandler.IMessageProvider;
import java.util.Hashtable;

/**
 *
 * @author Mr Bao
 */
public class MessageProvider implements IMessageProvider {

    private Hashtable<Class, IMessageHandler> handlers = new Hashtable<Class, IMessageHandler>();

    public void Register(Class type, IMessageHandler handler) {
        handlers.put(type, handler);
    }

    public IMessageHandler GetHandler(Class type) {
        return handlers.get(type);
    }
}
